package com.laowang.project.system.service.impl;

import java.util.List;

import com.laowang.project.system.service.SysUserHotelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.SysUserHotelMapper;
import com.laowang.project.system.domain.SysUserHotel;


/**
 * 酒店管理者中间Service业务层处理
 *
 * @author laowang
 * @date 2021-06-24
 */
@Service
public class SysUserHotelServiceImpl implements SysUserHotelService {
    @Autowired
    private SysUserHotelMapper sysUserHotelMapper;

    /**
     * 查询酒店管理者中间
     *
     * @param id 酒店管理者中间ID
     * @return 酒店管理者中间
     */
    @Override
    public SysUserHotel selectSysUserHotelById(Long id) {
        return sysUserHotelMapper.selectSysUserHotelById(id);
    }

    /**
     * 查询酒店管理者中间列表
     *
     * @param sysUserHotel 酒店管理者中间
     * @return 酒店管理者中间
     */
    @Override
    public List<SysUserHotel> selectSysUserHotelList(SysUserHotel sysUserHotel) {
        return sysUserHotelMapper.selectSysUserHotelList(sysUserHotel);
    }

    /**
     * 新增酒店管理者中间
     *
     * @param sysUserHotel 酒店管理者中间
     * @return 结果
     */
    @Override
    public int insertSysUserHotel(SysUserHotel sysUserHotel) {
        return sysUserHotelMapper.insertSysUserHotel(sysUserHotel);
    }

    /**
     * 修改酒店管理者中间
     *
     * @param sysUserHotel 酒店管理者中间
     * @return 结果
     */
    @Override
    public int updateSysUserHotel(SysUserHotel sysUserHotel) {
        return sysUserHotelMapper.updateSysUserHotel(sysUserHotel);
    }

    /**
     * 批量删除酒店管理者中间
     *
     * @param ids 需要删除的酒店管理者中间ID
     * @return 结果
     */
    @Override
    public int deleteSysUserHotelByIds(Long[] ids) {
        return sysUserHotelMapper.deleteSysUserHotelByIds(ids);
    }

    /**
     * 删除酒店管理者中间信息
     *
     * @param id 酒店管理者中间ID
     * @return 结果
     */
    @Override
    public int deleteSysUserHotelById(Long id) {
        return sysUserHotelMapper.deleteSysUserHotelById(id);
    }

    @Override
    public List<SysUserHotel> getListByUserId(Long userId) {


        return sysUserHotelMapper.getListByUserId(userId);
    }
}
